<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>J8 Parser Live</title>
    <script type="text/javascript" src="j8.js"></script>
    <script type="text/javascript" src="token.js"></script>
    <script type="text/javascript" src="ast.js"></script>
    <script type="text/javascript" src="scanner.js"></script>
    <script type="text/javascript">
        var j = new j8();
        var scanner = new j.Scanner();
        scanner.init(new j.CharacterStream("x + 2 + function lala() { return lala + 3; }"), 0);
        var token;
        while ((token = scanner.getNext()) != j.$T("EOS")) {
            //alert(token.name);
            if (token.name == "IDENTIFIER") {
              alert(scanner.getLiteralString());
            }
        }
        alert("ok");
    </script>
</head>
<body>

</body>
</html>